<?xml version="1.0" encoding="utf-8" ?>
<taskrunner name="config.datasources" version="1.0" date="2008-08-12" maxthreads="1">

	<!-- checks installed version. -->

	<includes>
		<file name="vida.install.settings.xml" />
	</includes>

	<resources>
		<resource name="msxmlds" maxusers="1"/>
	</resources>

	<tasks>
    
		<task name="remove.old.mssql" typename="@DeleteFile">
      <parameters>
        <parameter name="filename" value="${target.mssql.xml.fullpath}"/>
      </parameters> 
		</task>
		
		<task name="add.basedata" assembly="${a1}" typename="vida.install.utilities.AddDatasource">
			<description>
				Creates the file mssqlds.xml with correct connection data.
			</description>
			<dependencies list="remove.old.mssql"/>
			<resources list="msxmlds"/>
			
			<parameters>
				<parameter name="msxml.fullpath" value="${target.mssql.xml.fullpath}"/>
				<parameter name="jndi.name" value="BaseData"/>
				<parameter name="sql.userid" value="${sqlserver.local.userid}"/>
				<parameter name="sql.password" value="${sqlserver.local.password}"/>
				<parameter name="sql.server" value="${sqlserver.local.server}"/>
				<parameter name="sql.instance.name" value="${sqlserver.instance.name}"/>
				<parameter name="database" value="basedata"/>
			</parameters>
		</task>

		<task name="add.servicerepository" assembly="${a1}" typename="vida.install.utilities.AddDatasource">
			<description>
				Creates the file mssqlds.xml with correct connection data.
			</description>
			<dependencies list="remove.old.mssql"/>
			<resources list="msxmlds"/>

			<parameters>
				<parameter name="msxml.fullpath" value="${target.mssql.xml.fullpath}"/>
				<parameter name="jndi.name" value="${db.servicerepository.jndi.name}"/>
				<parameter name="sql.userid" value="${sqlserver.local.userid}"/>
				<parameter name="sql.password" value="${sqlserver.local.password}"/>
				<parameter name="sql.server" value="${sqlserver.local.server}"/>
				<parameter name="sql.instance.name" value="${sqlserver.instance.name}"/>
				<parameter name="database" value="${db.servicerepository.name}"/>
			</parameters>
		</task>

		<task name="add.carcomrt" assembly="${a1}" typename="vida.install.utilities.AddDatasource">
			<description>
				Creates the file mssqlds.xml with correct connection data.
			</description>
			<dependencies list="remove.old.mssql"/>
			<resources list="msxmlds"/>

			<parameters>
				<parameter name="msxml.fullpath" value="${target.mssql.xml.fullpath}"/>
				<parameter name="jndi.name" value="carcom"/>
				<parameter name="sql.userid" value="${sqlserver.local.userid}"/>
				<parameter name="sql.password" value="${sqlserver.local.password}"/>
				<parameter name="sql.server" value="${sqlserver.local.server}"/>
				<parameter name="sql.instance.name" value="${sqlserver.instance.name}"/>
				<parameter name="database" value="${db.carcomrt.name}"/>
			</parameters>
		</task>

		<task name="add.epc" assembly="${a1}" typename="vida.install.utilities.AddDatasource">
			<description>
				Creates the file mssqlds.xml with correct connection data.
			</description>
			<dependencies list="remove.old.mssql"/>
			<resources list="msxmlds"/>

			<parameters>
				<parameter name="msxml.fullpath" value="${target.mssql.xml.fullpath}"/>
				<parameter name="jndi.name" value="epc"/>
				<parameter name="sql.userid" value="${sqlserver.local.userid}"/>
				<parameter name="sql.password" value="${sqlserver.local.password}"/>
				<parameter name="sql.server" value="${sqlserver.local.server}"/>
				<parameter name="sql.instance.name" value="${sqlserver.instance.name}"/>
				<parameter name="database" value="${db.epc.name}"/>
			</parameters>
		</task>

		<task name="add.imagerepository" assembly="${a1}" typename="vida.install.utilities.AddDatasource">
			<description>
				Creates the file mssqlds.xml with correct connection data.
			</description>
			<dependencies list="remove.old.mssql"/>
			<resources list="msxmlds"/>

			<parameters>
				<parameter name="msxml.fullpath" value="${target.mssql.xml.fullpath}"/>
				<parameter name="jndi.name" value="image"/>
				<parameter name="sql.userid" value="${sqlserver.local.userid}"/>
				<parameter name="sql.password" value="${sqlserver.local.password}"/>
				<parameter name="sql.server" value="${sqlserver.local.server}"/>
				<parameter name="sql.instance.name" value="${sqlserver.instance.name}"/>
				<parameter name="database" value="${db.imagerepository.name}"/>
			</parameters>
		</task>

		<task name="add.accessserver" assembly="${a1}" typename="vida.install.utilities.AddDatasource">
			<description>
				Creates the file mssqlds.xml with correct connection data.
			</description>
			<dependencies list="remove.old.mssql"/>
			<resources list="msxmlds"/>

			<parameters>
				<parameter name="msxml.fullpath" value="${target.mssql.xml.fullpath}"/>
				<parameter name="jndi.name" value="accessserver"/>
				<parameter name="sql.userid" value="${sqlserver.local.userid}"/>
				<parameter name="sql.password" value="${sqlserver.local.password}"/>
				<parameter name="sql.server" value="${sqlserver.local.server}"/>
				<parameter name="sql.instance.name" value="${sqlserver.instance.name}"/>
				<parameter name="database" value="accessserver"/>
			</parameters>
		</task>

	</tasks>

</taskrunner>